package ch.uzh.ifi.seal.ssqa.ui.providers;

import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.zest.core.viewers.IGraphEntityContentProvider;

import ch.uzh.ifi.seal.ssqa.model.Source;

public class FileModelContentProvider extends ArrayContentProvider implements IGraphEntityContentProvider {

	@Override
	public Object[] getConnectedTo(Object entity) {
		if (entity instanceof Source){
			Source source = (Source)entity;
			if(source.getIncludes() != null && source.getIncludes().size()>0) {
				return source.getIncludes().toArray();
			}
		}
		return null;
	}
}
